For each character in @string, if the character is not in @valid_chars, replaces the character with @substitutor.
Modifies @string in place, and return @string itself, not a copy. The return value is to allow nesting such as:
|[<!-- language="C" --> g_ascii_strup (g_strcanon (str, "abc", '?')) ]|
In order to modify a copy, you may use g_strdup():
|[<!-- language="C" --> reformatted = g_strcanon (g_strdup (const_str), "abc", '?'); ... g_free (reformatted); ]|
a nul-terminated array of bytes
bytes permitted in @string
replacement character for disallowed bytes
the modified @string
See Implementation
For each character in @string, if the character is not in @valid_chars, replaces the character with @substitutor.
Modifies @string in place, and return @string itself, not a copy. The return value is to allow nesting such as:
|[<!-- language="C" --> g_ascii_strup (g_strcanon (str, "abc", '?')) ]|
In order to modify a copy, you may use g_strdup():
|[<!-- language="C" --> reformatted = g_strcanon (g_strdup (const_str), "abc", '?'); ... g_free (reformatted); ]|